using System;
using System.ComponentModel.DataAnnotations;

namespace AiPlatformAdmin.Api.DTOs;

public class PluginDto
{
    public int Id { get; set; }
    public string Name { get; set; } = string.Empty;
    public string? Description { get; set; }
    public string PluginType { get; set; } = string.Empty;
    public string AuthMethod { get; set; } = string.Empty;
    public string? Endpoint { get; set; }
    public string? ParameterDefinitions { get; set; }
    public DateTime CreatedAt { get; set; }
    public DateTime UpdatedAt { get; set; }
    public int TenantId { get; set; }
}

public class CreatePluginDto
{
    [Required]
    [MaxLength(200)]
    public string Name { get; set; } = string.Empty;

    [MaxLength(1000)]
    public string? Description { get; set; }

    [Required]
    [MaxLength(50)]
    public string PluginType { get; set; } = string.Empty;

    [Required]
    [MaxLength(50)]
    public string AuthMethod { get; set; } = string.Empty;

    [Url]
    public string? Endpoint { get; set; }

    public string? ParameterDefinitions { get; set; }
}

public class UpdatePluginDto
{
    [Required]
    [MaxLength(200)]
    public string Name { get; set; } = string.Empty;

    [MaxLength(1000)]
    public string? Description { get; set; }

    [Required]
    [MaxLength(50)]
    public string PluginType { get; set; } = string.Empty;

    [Required]
    [MaxLength(50)]
    public string AuthMethod { get; set; } = string.Empty;

    [Url]
    public string? Endpoint { get; set; }

    public string? ParameterDefinitions { get; set; }
}

